home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000161_fdc@columbia.edu_Tue Mar 30 15:16:31 2004.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Trying to connect to a device console via COM 1 (no dialing modem)
  5. Date: 30 Mar 2004 20:16:05 GMT
  6. Organization: Columbia University
  7. Lines: 59
  8. Message-ID: <slrnc6jlc5.ml6.fdc@sesame.cc.columbia.edu>
  9. References: <9c258be2.0403292240.2e00c890@posting.google.com> <9c258be2.0403300608.46d5097f@posting.google.com> <slrnc6j2n7.gj9.fdc@sesame.cc.columbia.edu> <9c258be2.0403301135.51769d45@posting.google.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1080677765 29741 128.59.59.56 (30 Mar 2004 20:16:05 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 30 Mar 2004 20:16:05 GMT
  15. User-Agent: slrn/0.9.8.0 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14873
  17.  
  18. On 2004-03-30, Klein Bill <collector59ca@yahoo.com> wrote:
  19. : First of all thanks for your answer.
  20. : However I'm still confused.
  21. : In my second script (the one before that ending with the INPUT...) I
  22. : still have an OUTPUT CR followed by an input (waiting for the prompt
  23. : inside the for loop).
  24. :
  25. You mean this one?
  26.  
  27.   if def tsprompt {                     
  28.       for \%i 1 2 1 {                   
  29.    input 1 \m(tsprompt)           
  30.    if success break               
  31.    output \13                     
  32.       } lineout show config          ;command to send      
  33.   }
  34.  
  35. It has a pretty bad syntax error: you can't put a statement right
  36. after a closing brace.  You need either a newline or a comma:
  37.  
  38.   if def tsprompt {                     
  39.       for \%i 1 2 1 {                   
  40.           input 1 \m(tsprompt)           
  41.           if success break               
  42.           output \13                     
  43.       }
  44.       lineout show config          ;command to send      
  45.   }
  46.  
  47. This one would have INPUT active until it received its first prompt.
  48. Then it breaks from the INPUT loop and so it will not read any more
  49. characters.
  50.  
  51. : From your explanation Frank, I understand that sending a command like:
  52. :
  53. : lineout show config
  54. :
  55. : won't be echoed to screen if not followed by an input something. Why
  56. : is that so?
  57. : I mean why doesn't Kermit show me at least what it sent nevermind if
  58. : the script ends?
  59. :
  60. No, Kermit doesn't show what it sent, only what it receives.  What's
  61. supposed to happen in this case is: Kermit sends "show config" (and a
  62. line terminator), and the router echoes this; subsequent INPUT commands
  63. pick up the echo.
  64.  
  65. In the (nowadays rare) case that the device on the other end doesn't echo,
  66. you can tell Kermit to:
  67.  
  68.   set duplex half
  69.  
  70. or:
  71.  
  72.   set local-echo on
  73.  
  74. (same thing) to make OUTPUT echo locally.
  75.  
  76. - Frank